# -*- coding: utf-8 -*-
# @Time: 2021/8/16 11:21
# @File: problem-23.py
# @DESC: https://leetcode-cn.com/problems/merge-k-sorted-lists/
# 合并K个升序链表
from list_node_common import *
from typing import List


# 三个链表都是升序，说明找到一个插入点之后，就可以一直向后插入
class Solution:
    def mergeKLists(self, lists: List[ListNode]) -> ListNode:
        # 循环三次链表，插入
        nhead = lists[0]
        p = nhead
        lent = len(lists)
        for i in range(1,lent):
            print(i)


s = Solution()
lists = [
    listToNode([1,2,3]),
    listToNode([4,5,6])
]
r = s.mergeKLists(lists)

